﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GadgetBase
{

    public partial class GadgetSettingsWindow : DragedWindow
    {
        private const string bgImageName = "settings_bg2.png";

        public GadgetSettingsWindow()
        {
            base.Height = 300;
            base.Width=300;

            base.ShowInTaskbar = false;
            base.WindowStyle = WindowStyle.None;
            base.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            base.AllowsTransparency = true;
            string bgImagePath = GlobalMethods.GetFullPath(bgImageName);
            base.Background = new ImageBrush(GlobalMethods.GetBitmapImage(bgImagePath));
        }

        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (e.Key == Key.Escape)
            {
                this.Close();
            }
        }
    }
}
